<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<meta name="author" content="phpok.com" />
	<meta http-equiv="expires" content="wed, 26 feb 1997 08:21:57 gmt"> 
	<title>{$config.title}</title>
<style type="text/css">
html{font-size:14px;font-family:"Microsoft Yahei","宋体","Arial","Tahoma";margin:0;padding:0;background:#FFFFFF;}
body{margin:3px;padding:0;overflow-y:scroll;_margin:0; _height:100%;}
a{color:#000;text-decoration: none;}
.red{color:red;}
ul.filelist{list-style:none;padding:0;margin:0}
ul.filelist li{float:left;margin:3px 5px;height:75px;width:296px;padding:1px;border:1px solid #ccc;cursor:pointer;}
ul.filelist li:hover{background:#efefef;}
ul.filelist li .ico{float:left;width:75px;height:75px;text-align:center;position:relative;z-index: 2;}
ul.filelist li .ico .checkbox{position:absolute;width:20px;height:20px;background:#fff;top:1px;left:1px;z-index:1;}
ul.filelist li .note{float:left;width:220px;overflow:hidden;}
ul.filelist li .note .info{line-height:22px;overflow:hidden;height:22px;}
ul.filelist li img.img{width:73px;height:73px;text-align:center;padding:1px;}

.pagelist{text-align:center;height:30px;overflow:hidden;margin-top:7px;}
.pagelist ul{list-style:none;margin:0;padding:0;text-align:center;}
.pagelist ul li{display:inline;height:22px;line-height:24px;margin:0 5px 0 0;}
.pagelist ul li a{display:inline;padding:1px 5px;border:1px solid #ddd;cursor:pointer;}
.pagelist ul li a:hover{background:#efefef;border:1px solid #ccc;text-decoration:none;}
.pagelist ul li a.current{background:#E4E4E4;border:1px solid #ccc;text-decoration:none;}
div.clear{clear:both;height:0;line-height:0;overflow:hidden;display:block;visibility:hidden;}
.search{border:1px solid #E5E5E5;background:#F5F5F5;padding-left:12px;line-height:25px;margin-top:3px;}
select{padding:3px;}
input.keywords{width:150px;padding:3px;border:1px solid #ABADB3;}
</style>
<link rel="stylesheet" href="static/admin/layui/{#css#}/layui.css" media="all" />
<link rel="stylesheet" href="{#css#}/extadmin.css" media="all" />
<link rel="stylesheet" type="text/css" href="{#css#}/artdialog.css" />
<link rel="stylesheet" type="text/css" href="{#css#}/form.css" />
<link rel="stylesheet" type="text/css" href="{#css#}/smartmenu.css" />
{func phpok_head_css}
<script type="text/javascript" src="{url ctrl=js ext=jquery.artdialog.js /}"></script>
<script type="text/javascript" src="{#js#}/laydate/laydate.js"></script>
{func phpok_head_js}
<script type="text/javascript">
function phpok_input(val)
{
	var obj = art.dialog.opener;
	obj.$("#{$id}").val(val);
	$.dialog.close();
}
function check_search()
{
	var cate_id = $("#top_cate_id").val();
	var keywords = $("#keywords").val();
	if(!cate_id && !keywords){
		$.dialog.alert('请选择要搜索的项');
		return false;
	}
	return true;
}
$(document).ready(function(){  
    $(document).bind("contextmenu",function(e){   
          return false;   
    });
});
</script>
</head>
<body>
<div class="search" style="padding:3px 5px;">
	<form method="post" class="layui-form" action="{$formurl}" onsubmit="return check_search()">
	<table>
	<tr>
		<!-- if $session.admin_id -->
		<td>搜索：</td>
		<td><div style="margin-right:10px;"><select name="cate_id" id="top_cate_id" lay-ignore>
			<option value="">全部分类…</option>
			<!-- loop from=$catelist key=$key value=$value id=$tmpid -->
			<option value="{$value.id}"{if $value.id == $cate_id} selected{/if}>{$value.title}</option>
			<!-- /loop -->
		</select></div></td>
		<td><div style="margin-right:10px;"><input type="text" name="keywords" id="keywords" value="{$keywords}" class="keywords" /></div></td>
		<td><div style="margin-right:10px;"><input type="submit" value="{lang搜索}" /></div></td>
		<!-- /if -->
		<td><input type="button" value="{lang刷新页面}" onclick="$.phpok.reload()" /></td>
	</tr>
	</table>
	</form>
</div>
<ul class="filelist">
	<!-- loop from=$rslist key=$key value=$value id=$tmpid -->
	<li onclick="phpok_input('{$value.filename}')">
		<div class="li_bg">
		<div class="ico"><img src="{$value.ico}" class="img" /></div>
		<div class="note">
			<div class="info">名称：{$value.title}</div>
			<div class="info">添加：{func date "Y-m-d H:i:s" $value.addtime}</div>
			<!-- if $value.attr && $value.attr.width && $value.attr.height -->
			<div class="info">属性：{$value.attr ? $value.attr.width.' x '.$value.attr.height : '-'}</div>
			<!-- /if -->
		</div>
		<div class="clear"></div>
		</div>
	</li>
	<!-- /loop -->
	<div class="clear"></div>
</ul>
<!-- if $pagelist -->
<div class="pagelist">
<ul>
	<!-- loop from=$pagelist key=$key value=$value id=$tmpid -->
	<li><a href="{$value.url}"{if $value.status} class="current"{/if}>{$value.title}</a></li>
	<!-- /loop -->
</ul>
</div>
<!-- /if -->
<!-- if $session.admin_id -->


<div class="search">附件上传</div>
<div style="padding:10px;margin:5px;">
<div class="table">
	<div class="title">
		{lang附件上传：}
		<span class="note">{lang请选择要上传的附件分类}{lang上传的文件上传不能超过：}<span class="red">{func get_cfg_var upload_max_filesize}</span></span>
	</div>
	<div class="content">
		<table>
		<tr>
			<td>
				<select id="add_cate_id" onchange="cate_change()">
					<!-- loop from=$catelist key=$key value=$value -->
					<option value="{$value.id}"{if $cate_id == $value.id} selected{/if} data="{$value.filetypes}" catename="{$value.title}">
					{$value.title}<!-- if $value.typeinfos --> / {lang支持上传格式：}{$value.typeinfos}<!-- /if --></option>
					<!-- /loop -->
				</select>
			</td>
		</tr>
		<tr>
			<td><div style="margin-top:10px;">{$upload_buttons}</div></td>
		</tr>
		</table>
	</div>
</div>
</div>
<script type="text/javascript">
function cate_change()
{
	val = $("#add_cate_id").val();
	if(!val){
		$.dialog.alert('请选择要存储的目标分类');
		return false;
	}
	$.phpok.go('{$formurl}&cate_id='+val);
	return false;
}
</script>
<!-- /if -->
</body>
</html>
